commonlibsse_ng\re\u/
UserEvents.rs

1mod input_context_id;
2
3pub use self::input_context_id::{
4    INPUT_CONTEXT_ID, INPUT_CONTEXT_ID_AE, INPUT_CONTEXT_ID_AE_CEnum, INPUT_CONTEXT_ID_SE,
5    INPUT_CONTEXT_ID_SE_CEnum, INPUT_CONTEXT_ID_VR, INPUT_CONTEXT_ID_VR_CEnum,
6};
7
8use crate::re::BSFixedString::BSFixedString;
9
10#[commonlibsse_ng_derive_internal::to_bitflags]
11#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[repr(u32)]
13pub enum USER_EVENT_FLAG {
14    None = 0,
15    Movement = 1 << 0,
16    Looking = 1 << 1,
17    Activate = 1 << 2,
18    Menu = 1 << 3,
19    Console = 1 << 4,
20    POVSwitch = 1 << 5,
21    Fighting = 1 << 6,
22    Sneaking = 1 << 7,
23    MainFour = 1 << 8,
24    WheelZoom = 1 << 9,
25    Jumping = 1 << 10,
26    VATS = 1 << 11,
27    Invalid = 1 << 31,
28}
29
30#[repr(C)]
31pub struct UserEvents {
32    pad001: u8,                       // 0x001
33    pad002: u16,                      // 0x002
34    pad004: u32,                      // 0x004
35    forward: BSFixedString,           // 0x008 - "Forward"
36    back: BSFixedString,              // 0x010 - "Back"
37    strafeLeft: BSFixedString,        // 0x018 - "Strafe Left"
38    strafeRight: BSFixedString,       // 0x020 - "Strafe Right"
39    move_: BSFixedString,             // 0x028 - "Move"
40    look: BSFixedString,              // 0x030 - "Look"
41    activate: BSFixedString,          // 0x038 - "Activate"
42    leftAttack: BSFixedString,        // 0x040 - "Left Attack/Block"
43    rightAttack: BSFixedString,       // 0x048 - "Right Attack/Block"
44    dualAttack: BSFixedString,        // 0x050 - "Dual Attack"
45    forceRelease: BSFixedString,      // 0x058 - "ForceRelease"
46    pause: BSFixedString,             // 0x060 - "Pause"
47    readyWeapon: BSFixedString,       // 0x068 - "Ready Weapon"
48    togglePOV: BSFixedString,         // 0x070 - "Toggle POV"
49    jump: BSFixedString,              // 0x078 - "Jump"
50    journal: BSFixedString,           // 0x080 - "Journal"
51    sprint: BSFixedString,            // 0x088 - "Sprint"
52    sneak: BSFixedString,             // 0x090 - "Sneak"
53    shout: BSFixedString,             // 0x098 - "Shout"
54    kinectShout: BSFixedString,       // 0x0A0 - "KinectShout"
55    grab: BSFixedString,              // 0x0A8 - "Grab"
56    run: BSFixedString,               // 0x0B0 - "Run"
57    toggleRun: BSFixedString,         // 0x0B8 - "Toggle Always Run"
58    autoMove: BSFixedString,          // 0x0C0 - "Auto-Move"
59    quicksave: BSFixedString,         // 0x0C8 - "Quicksave"
60    quickload: BSFixedString,         // 0x0D0 - "Quickload"
61    newSave: BSFixedString,           // 0x0D8 - "NewSave"
62    inventory: BSFixedString,         // 0x0E0 - "Inventory"
63    stats: BSFixedString,             // 0x0E8 - "Stats"
64    map: BSFixedString,               // 0x0F0 - "Map"
65    screenshot: BSFixedString,        // 0x0F8 - "Screenshot"
66    multiScreenshot: BSFixedString,   // 0x100 - "Multi-Screenshot"
67    console: BSFixedString,           // 0x108 - "Console"
68    cameraPath: BSFixedString,        // 0x110 - "CameraPath"
69    tweenMenu: BSFixedString,         // 0x118 - "Tween Menu"
70    takeAll: BSFixedString,           // 0x120 - "Take All"
71    accept: BSFixedString,            // 0x128 - "Accept"
72    cancel: BSFixedString,            // 0x130 - "Cancel"
73    up: BSFixedString,                // 0x138 - "Up"
74    down: BSFixedString,              // 0x140 - "Down"
75    left: BSFixedString,              // 0x148 - "Left"
76    right: BSFixedString,             // 0x150 - "Right"
77    pageUp: BSFixedString,            // 0x158 - "PageUp"
78    pageDown: BSFixedString,          // 0x160 - "PageDown"
79    pick: BSFixedString,              // 0x168 - "Pick"
80    pickNext: BSFixedString,          // 0x170 - "PickNext"
81    pickPrevious: BSFixedString,      // 0x178 - "PickPrevious"
82    cursor: BSFixedString,            // 0x180 - "Cursor"
83    kinect: BSFixedString,            // 0x188 - "Kinect"
84    sprintStart: BSFixedString,       // 0x190 - "SprintStart"
85    sprintStop: BSFixedString,        // 0x198 - "SprintStop"
86    sneakStart: BSFixedString,        // 0x1A0 - "sneakStart"
87    sneakStop: BSFixedString,         // 0x1A8 - "sneakStop"
88    blockStart: BSFixedString,        // 0x1B0 - "blockStart"
89    blockStop: BSFixedString,         // 0x1B8 - "blockStop"
90    blockBash: BSFixedString,         // 0x1C0 - "blockBash"
91    attackStart: BSFixedString,       // 0x1C8 - "attackStart"
92    attackPowerStart: BSFixedString,  // 0x1D0 - "attackPowerStart"
93    reverseDirection: BSFixedString,  // 0x1D8 - "reverseDirection"
94    unequip: BSFixedString,           // 0x1E0 - "Unequip"
95    zoomIn: BSFixedString,            // 0x1E8 - "Zoom In"
96    zoomOut: BSFixedString,           // 0x1F0 - "Zoom Out"
97    rotateItem: BSFixedString,        // 0x1F8 - "RotateItem"
98    leftStick: BSFixedString,         // 0x200 - "Left Stick"
99    prevPage: BSFixedString,          // 0x208 - "PrevPage"
100    nextPage: BSFixedString,          // 0x210 - "NextPage"
101    prevSubPage: BSFixedString,       // 0x218 - "PrevSubPage"
102    nextSubPage: BSFixedString,       // 0x220 - "NextSubPage"
103    leftEquip: BSFixedString,         // 0x228 - "LeftEquip"
104    rightEquip: BSFixedString,        // 0x230 - "RightEquip"
105    toggleFavorite: BSFixedString,    // 0x238 - "ToggleFavorite"
106    favorites: BSFixedString,         // 0x240 - "Favorites"
107    hotkey1: BSFixedString,           // 0x248 - "Hotkey1"
108    hotkey2: BSFixedString,           // 0x250 - "Hotkey2"
109    hotkey3: BSFixedString,           // 0x258 - "Hotkey3"
110    hotkey4: BSFixedString,           // 0x260 - "Hotkey4"
111    hotkey5: BSFixedString,           // 0x268 - "Hotkey5"
112    hotkey6: BSFixedString,           // 0x270 - "Hotkey6"
113    hotkey7: BSFixedString,           // 0x278 - "Hotkey7"
114    hotkey8: BSFixedString,           // 0x280 - "Hotkey8"
115    quickInventory: BSFixedString,    // 0x288 - "Quick Inventory"
116    quickMagic: BSFixedString,        // 0x290 - "Quick Magic"
117    quickStats: BSFixedString,        // 0x298 - "Quick Stats"
118    quickMap: BSFixedString,          // 0x2A0 - "Quick Map"
119    toggleCursor: BSFixedString,      // 0x2A8 - "ToggleCursor"
120    wait: BSFixedString,              // 0x2B0 - "Wait"
121    click: BSFixedString,             // 0x2B8 - "Click"
122    mapLookMode: BSFixedString,       // 0x2C0 - "MapLookMode"
123    equip: BSFixedString,             // 0x2C8 - "Equip"
124    dropItem: BSFixedString,          // 0x2D0 - "DropItem"
125    rotate: BSFixedString,            // 0x2D8 - "Rotate"
126    nextFocus: BSFixedString,         // 0x2E0 - "NextFocus"
127    prevFocus: BSFixedString,         // 0x2E8 - "PreviousFocus"
128    setActiveQuest: BSFixedString,    // 0x2F0 - "SetActiveQuest"
129    placePlayerMarker: BSFixedString, // 0x2F8 - "PlacePlayerMarker"
130    xButton: BSFixedString,           // 0x300 - "XButton"
131    yButton: BSFixedString,           // 0x308 - "YButton"
132    chargeItem: BSFixedString,        // 0x310 - "ChargeItem"
133    unk318: BSFixedString,            // 0x318 - ""
134    playerPosition: BSFixedString,    // 0x320 - "PlayerPosition"
135    localMap: BSFixedString,          // 0x328 - "LocalMap"
136    localMapMoveMode: BSFixedString,  // 0x330 - "LocalMapMoveMode"
137    itemZoom: BSFixedString,          // 0x338 - "Item Zoom"
138}
139const _: () = assert!(core::mem::size_of::<UserEvents>() == 0x340);
140
141impl UserEvents {
142    /// Gets the singleton instance of `UserEvents`.
143    #[commonlibsse_ng_derive_internal::relocate(
144        cast_as = "*mut *mut UserEvents",
145        default = "None",
146        deref_once,
147        id(se = 516458, ae = 402638)
148    )]
149    pub fn get_singleton() -> Option<&'static UserEvents> {
150        |deref_type: DerefType| unsafe { deref_type.as_ref() }
151    }
152}